﻿* Encoding: UTF-8.
***** NOTE: The following syntax was used to perform the necessary data management for the POQ article. 
*** Furthermore, the syntax computes the tables based on which figures 1 through 7 were created and Figures A1 and A3 were created (and Table A3).

*** Loading the ESS cumulative dataset (Rounds 1 through 9).
GET 
  FILE='C:\Users\ivan.petrusek\Desktop\Public Opinion Quarterly\REPLICATION FILES\ESS1-9e01_1.sav'.


*** Selecting the 18 countries analysed in the POQ article (i.e. countries with at least 8 ESS rounds available).
select if cntry = "BE" or cntry = "DE" or cntry = "ES"  or cntry = "FI"  or cntry = "FR"  or cntry = "GB"  or cntry = "HU"  or cntry = "CH"  or cntry = "IE" 
or cntry = "NL"  or cntry = "NO"  or cntry = "PL"  or cntry = "PT"  or cntry = "SE"  or cntry = "SI"  or cntry = "CZ"  or cntry = "DK"  or cntry = "EE".
fre cntry.
cro cntry by essround.


*** To make the resulting ESS file smaller, all variables not used in the article were dropped from the dataset.
*** Consequently, the resulting dataset only contains the variables directly used in the analyses (cntry, gincdif, hinctnta and hincfel), ESS file/respondent identification variables and weight variables.
*** 16 variables were kept in total.
*** The resulting reduced version of the ESS cumulative dataset (ESS1-9e01_1_red.sav) is stored at the Dataverse.
SAVE OUTFILE='C:\Users\ivan.petrusek\Desktop\Public Opinion Quarterly\REPLICATION FILES\ESS1-9e01_1_red.sav'
  /DROP=tvtot tvpol rdtot rdpol nwsptot nwsppol nwspol netusoft netuse netustm ppltrst pplfair pplhlp polintr psppsgv psppsgva actrolg actrolga psppipl psppipla cptppol cptppola polcmpl poldcs trstprl trstlgl trstplc trstplt 
  trstprt trstep trstun vote contplt wrkprty wrkorg badge sgnptit pbldmn bctprd clsprty prtdgcl mmbprty lrscale stflife stfeco stfgov stfdem stfedu stfhlth freehms prtyban scnsenv euftf imsmetn imdfetn impcntr imbgeco imueclt 
  imwbcnt pstplonl hmsfmlsh hmsacld happy sclmeet inmdisc inprdsc sclact crmvct aesfdrk brghmwr brghmef crvctwr crvctef trrenyr trrcnyr trrprsn trrtort health hlthhmp rlgblg rlgdnm rlgblge rlgdnme rlgdgr rlgatnd pray dscrgrp 
  dscrrce dscrntn dscrrlg dscrlng dscretn dscrage dscrgnd dscrsex dscrdsb dscroth dscrdk dscrref dscrnap dscrna ctzcntr ctzship ctzshipa ctzshipb ctzshipc brncntr cntbrth cntbrtha cntbrthb cntbrthc livecntr livecnta lnghoma lnghom1 
  lnghomb lnghom2 blgetmg facntr facntn fbrncnt fbrncnta fbrncntb fbrncntc mocntr mocntn mbrncnt mbrncnta mbrncntb mbrncntc atchctr atcherp hhmmb gndr yrbrn agea partner rshpsts marsts marital maritala maritalb lvghw lvghwa 
  lvgoptn lvgptn lvgptna lvgptne lvgptnea dvrcdev dvrcdeva chldhm chldhhe domicil edulvla edulvlb eisced edufld eduyrs pdwrk edctn uempla uempli dsbld rtrd cmsrv hswrk dngoth dngdk dngref dngna mainact mnactic crpdwk 
  pdjobev pdjobyr emplrel emplno wrkctr wrkctra estsz jbspv njbspv wkdcorg wkdcorga iorgact icwhct wkhct wkhtot nacer1 nacer11 nacer2 tporgwk iscoco isco08 wrkac6m uemp3m uemp12m uemp5yr mbtru hincsrc hincsrca 
  hincfel brwmny edulvlpa edulvlpb eiscedp pdwrkp edctnp uemplap uemplip dsbldp rtrdp cmsrvp hswrkp dngothp dngdkp dngnapp dngrefp dngnap mnactp crpdwkp iscocop isco08p emprelp emplnop jbspvp njbspvp wkdcorp ioactp 
  wkhtotp edulvlfa edulvlfb eiscedf emprf14 emplnof jbspvf occf14 occf14a occf14b edulvlma edulvlmb eiscedm emprm14 emplnom jbspvm occm14 occm14a occm14b atncrse fxltph mbltph inttph anctry1 anctry2 ipcrtiv imprich 
  ipeqopt ipshabt impsafe impdiff ipfrule ipudrst ipmodst ipgdtim impfree iphlppl ipsuces ipstrgv ipadvnt ipbhprp iprspot iplylfr impenv imptrad impfun cregion regunit intewde inwdd inwdds inwdde inwmm inwmms inwmme inwyr 
  inwyys inwyye inwshh inwsmm inwehh inwemm inwtm supqdd supqmm supqyr mode dcsfwrk wrywprb trdawrk jbprtfp pfmfdjb pfmfdjba stfjbot fltdpr flteeff slprl wrhpp fltlnl fltlnla enjlf fltsd cldgng mnrgtjb hrshsnt hrshsnta pdaprp
   pdaprpa smbtjob smbtjoba
  /COMPRESSED.


*** !!! In order to load this reduced version of the ESS cumulative dataset (ESS1-9e01_1_red.sav), the following code is run !!!.
* The code specified above is provided for transparency (i.e. to demonstrate what code was used to subset the required countries and variables.
GET 
  FILE='C:\Users\ivan.petrusek\Desktop\Public Opinion Quarterly\REPLICATION FILES\ESS1-9e01_1_red.sav'.

*** Weighting the dataset by Post-stratification weight including design weight (variable pspwght).
weight by pspwght.


*** Recoding the outcome variable (i.e. Support for income redistribution) into 0/1 variable (where 1 indicates that the respondent supports income redistribution).
fre gincdif.
recode gincdif (1 2 = 1) (3 4 5 8 = 0) into sup_red.
formats sup_red (f1.0).
variable labels sup_red"Support for income redistribution: binary".
value labels sup_red 1"Expressed support for income redistribution" 0"Did not express support for income redistribution".
fre sup_red.
cro gincdif by sup_red.


*** Creating the welfare regime variable (based on classification of countries by: Deeming and Jones, 2015).
compute regime = $SYSMIS.
if (cntry = "BE" or cntry = "DE" or cntry = "FR" or cntry = "CH" or cntry = "NL") regime = 1.
if (cntry = "FI" or cntry = "NO" or cntry = "SE" or cntry = "DK") regime = 2.
if (cntry = "GB" or cntry = "IE") regime = 3.
if (cntry = "ES" or cntry = "PT") regime = 4.
if (cntry = "HU" or cntry = "PL" or cntry = "SI" or cntry = "CZ" or cntry = "EE") regime = 5.
formats regime (f1.0).

variable labels regime "Welfare regime type: 5 types".
value labels regime
1"Conservative"
2"Social Democratic"
3"Liberal"
4"Mediterranean"
5"Post-Communist".

fre regime.
cro cntry by regime.


***** Support for income redistribution by 18 countries and 9 ESS rounds (classified by welfare regimes).
* This syntax creates a table stored in "support_by_country_and_round.csv" file.
* This table is used to create the Figure 2.
CTABLES
  /VLABELS VARIABLES=regime cntry essround sup_red DISPLAY=BOTH
  /TABLE regime [C] > cntry [C] BY essround [C] > sup_red [S][MEAN DOT40.2]
  /CATEGORIES VARIABLES=regime cntry essround ORDER=A KEY=VALUE EMPTY=EXCLUDE
  /CRITERIA CILEVEL=95.

* Simple (unweighted) welfare regime means were computed based on this table and stored into "support_by_round_aggregated_by_regimes.csv" and "support_by_round_aggregated_by_regimes_without_DNK_and_CZE.csv" files.
* These two resulting .csv files were used to create Figure 1 and Figure A1 (A1 reported in the appendix).



********** CREATING THE HARMONISED INCOME VARIABLE.
*** hinctnt = income variable in ESS rounds 1, 2 and 3.
fre hinctnt.
missing values hinctnt (77 88 99).

* Support for income redistribution by income groups in ESS rounds 1, 2 and 3.
* Custom Tables.
CTABLES
  /VLABELS VARIABLES=regime cntry essround hinctnt sup_red DISPLAY=BOTH
  /TABLE regime [C] > cntry [C] BY essround [C] > hinctnt [C] > sup_red [S][MEAN DOT40.2]
  /CATEGORIES VARIABLES=regime [1, 2, 3, 4, 5, OTHERNM] EMPTY=EXCLUDE
  /CATEGORIES VARIABLES=cntry essround hinctnt ORDER=A KEY=VALUE EMPTY=EXCLUDE MISSING=EXCLUDE
  /CRITERIA CILEVEL=95.




*** hinctnt = household income variable available in ESS rounds 1, 2 and 3.
fre hinctnt.
missing values hinctnt (77 88 99).

* Support for income redistribution by income groups in ESS rounds 1, 2 and 3.
CTABLES
  /VLABELS VARIABLES=regime cntry essround hinctnt sup_red DISPLAY=BOTH
  /TABLE regime [C] > cntry [C] BY essround [C] > hinctnt [C] > sup_red [S][MEAN DOT40.2]
  /CATEGORIES VARIABLES=regime [1, 2, 3, 4, 5, OTHERNM] EMPTY=EXCLUDE
  /CATEGORIES VARIABLES=cntry essround hinctnt ORDER=A KEY=VALUE EMPTY=EXCLUDE MISSING=EXCLUDE
  /CRITERIA CILEVEL=95.


*** hinctnta = household income variable available in ESS rounds 4 through 9.
fre hinctnta.
missing values hinctnta (77 88 99).

* Support for income redistribution by income groups in ESS rounds 4 to 9.
CTABLES
  /VLABELS VARIABLES=regime cntry essround hinctnta sup_red DISPLAY=BOTH
  /TABLE regime [C] > cntry [C] BY essround [C] > hinctnta [C] > sup_red [S][MEAN DOT40.2]
  /CATEGORIES VARIABLES=regime [1, 2, 3, 4, 5, OTHERNM] EMPTY=EXCLUDE
  /CATEGORIES VARIABLES=cntry essround hinctnta ORDER=A KEY=VALUE EMPTY=EXCLUDE MISSING=EXCLUDE
  /CRITERIA CILEVEL=95.

*** The new harmonised income variable, which classifies respondents in all nine ESS rounds into three categories, is called income.
* Creating a default category: 2 = respondents belonging to second, third and fourth quintile.
compute income = 2.

missing values hinctnt().
if hinctnt = 77 income = $SYSMIS.
if hinctnt = 88 income = $SYSMIS.
if hinctnt = 99 income = $SYSMIS.

missing values hinctnta ().
if hinctnta = 77 income = $SYSMIS.
if hinctnta = 88 income = $SYSMIS.
if hinctnta = 99 income = $SYSMIS.


*** ESS round 1.
if (cntry = "BE" and essround = 1 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4)) income = 1.
if (cntry = "DE" and essround = 1 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4)) income = 1.
if (cntry = "CH" and essround = 1 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4 or hinctnt = 5 or hinctnt = 6 or hinctnt = 7)) income = 1.
if (cntry = "NL" and essround = 1 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4 or hinctnt = 5)) income = 1.
if (cntry = "DK" and essround = 1 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4 or hinctnt = 5)) income = 1.
if (cntry = "FI" and essround = 1 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4)) income = 1.
if (cntry = "NO" and essround = 1 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4 or hinctnt = 5 or hinctnt = 6)) income = 1.
if (cntry = "SE" and essround = 1 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4 or hinctnt = 5)) income = 1.
if (cntry = "GB" and essround = 1 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4)) income = 1.
if (cntry = "ES" and essround = 1 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3)) income = 1.
if (cntry = "PT" and essround = 1 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3)) income = 1.
if (cntry = "CZ" and essround = 1 and (hinctnt = 1 or hinctnt = 2)) income = 1.
if (cntry = "PL" and essround = 1 and (hinctnt = 1 or hinctnt = 2)) income = 1.
if (cntry = "SI" and essround = 1 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3)) income = 1.

if (cntry = "BE" and essround = 1 and (hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "DE" and essround = 1 and (hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "CH" and essround = 1 and (hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "NL" and essround = 1 and (hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "DK" and essround = 1 and (hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "FI" and essround = 1 and (hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "NO" and essround = 1 and (hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "SE" and essround = 1 and (hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "GB" and essround = 1 and (hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "ES" and essround = 1 and (hinctnt = 7 or hinctnt = 8 or hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "PT" and essround = 1 and (hinctnt = 7 or hinctnt = 8 or hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "CZ" and essround = 1 and (hinctnt = 6 or hinctnt = 7 or hinctnt = 8 or hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "PL" and essround = 1 and (hinctnt = 5 or hinctnt = 6 or hinctnt = 7 or hinctnt = 8 or hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "SI" and essround = 1 and (hinctnt = 6 or hinctnt = 7 or hinctnt = 8 or hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.


*** ESS round 2.
if (cntry = "BE" and essround = 2 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4)) income = 1.
if (cntry = "DE" and essround = 2 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4)) income = 1.
if (cntry = "FR" and essround = 2 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4)) income = 1.
if (cntry = "CH" and essround = 2 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4 or hinctnt = 5 or hinctnt = 6 or hinctnt = 7)) income = 1.
if (cntry = "NL" and essround = 2 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4 or hinctnt = 5)) income = 1.
if (cntry = "DK" and essround = 2 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4 or hinctnt = 5)) income = 1.
if (cntry = "FI" and essround = 2 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4)) income = 1.
if (cntry = "NO" and essround = 2 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4 or hinctnt = 5 or hinctnt = 6)) income = 1.
if (cntry = "SE" and essround = 2 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4 or hinctnt = 5)) income = 1.
if (cntry = "GB" and essround = 2 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4)) income = 1.
if (cntry = "IE" and essround = 2 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4 or hinctnt = 5)) income = 1.
if (cntry = "ES" and essround = 2 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4)) income = 1.
if (cntry = "PT" and essround = 2 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3)) income = 1.
if (cntry = "CZ" and essround = 2 and (hinctnt = 1 or hinctnt = 2)) income = 1.
if (cntry = "PL" and essround = 2 and (hinctnt = 1 or hinctnt = 2)) income = 1.
if (cntry = "SI" and essround = 2 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3)) income = 1.

if (cntry = "BE" and essround = 2 and (hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "DE" and essround = 2 and (hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "FR" and essround = 2 and (hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "CH" and essround = 2 and (hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "NL" and essround = 2 and (hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "DK" and essround = 2 and (hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "FI" and essround = 2 and (hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "NO" and essround = 2 and (hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "SE" and essround = 2 and (hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "GB" and essround = 2 and (hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "IE" and essround = 2 and (hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "ES" and essround = 2 and (hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "PT" and essround = 2 and (hinctnt = 6 or hinctnt = 7 or hinctnt = 8 or hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "CZ" and essround = 2 and (hinctnt = 6 or hinctnt = 7 or hinctnt = 8 or hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "PL" and essround = 2 and (hinctnt = 5 or hinctnt = 6 or hinctnt = 7 or hinctnt = 8 or hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "SI" and essround = 2 and (hinctnt = 7 or hinctnt = 8 or hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.


*** ESS round 3.
if (cntry = "BE" and essround = 3 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4)) income = 1.
if (cntry = "DE" and essround = 3 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4)) income = 1.
if (cntry = "FR" and essround = 3 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4)) income = 1.
if (cntry = "CH" and essround = 3 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4 or hinctnt = 5 or hinctnt = 6 or hinctnt = 7)) income = 1.
if (cntry = "NL" and essround = 3 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4 or hinctnt = 5)) income = 1.
if (cntry = "DK" and essround = 3 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4 or hinctnt = 5)) income = 1.
if (cntry = "FI" and essround = 3 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4)) income = 1.
if (cntry = "NO" and essround = 3 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4 or hinctnt = 5 or hinctnt = 6)) income = 1.
if (cntry = "SE" and essround = 3 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4 or hinctnt = 5)) income = 1.
if (cntry = "GB" and essround = 3 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4 or hinctnt = 5)) income = 1.
if (cntry = "IE" and essround = 3 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4 or hinctnt = 5)) income = 1.
if (cntry = "ES" and essround = 3 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3 or hinctnt = 4)) income = 1.
if (cntry = "PT" and essround = 3 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3)) income = 1.
if (cntry = "PL" and essround = 3 and (hinctnt = 1 or hinctnt = 2)) income = 1.
if (cntry = "SI" and essround = 3 and (hinctnt = 1 or hinctnt = 2 or hinctnt = 3)) income = 1.

if (cntry = "BE" and essround = 3 and (hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "DE" and essround = 3 and (hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "FR" and essround = 3 and (hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "CH" and essround = 3 and (hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "NL" and essround = 3 and (hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "DK" and essround = 3 and (hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "FI" and essround = 3 and (hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "NO" and essround = 3 and (hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "SE" and essround = 3 and (hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "GB" and essround = 3 and (hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "IE" and essround = 3 and (hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "ES" and essround = 3 and (hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "PT" and essround = 3 and (hinctnt = 7 or hinctnt = 8 or hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "PL" and essround = 3 and (hinctnt = 5 or hinctnt = 6 or hinctnt = 7 or hinctnt = 8 or hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.
if (cntry = "SI" and essround = 3 and (hinctnt = 7 or hinctnt = 8 or hinctnt = 9 or hinctnt = 10 or hinctnt = 11 or hinctnt = 12)) income = 3.


*** ESS round 4.
if (cntry = "BE" and essround = 4 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3 or hinctnta = 4)) income = 1.
if (cntry = "DE" and essround = 4 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "FR" and essround = 4 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "CH" and essround = 4 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "NL" and essround = 4 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "DK" and essround = 4 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "FI" and essround = 4 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "NO" and essround = 4 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "SE" and essround = 4 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3 or hinctnta = 4)) income = 1.
if (cntry = "GB" and essround = 4 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "IE" and essround = 4 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "ES" and essround = 4 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "PT" and essround = 4 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "CZ" and essround = 4 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "EE" and essround = 4 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "HU" and essround = 4 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "PL" and essround = 4 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "SI" and essround = 4 and (hinctnta = 1)) income = 1.

if (cntry = "BE" and essround = 4 and (hinctnta = 10)) income = 3.
if (cntry = "DE" and essround = 4 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "FR" and essround = 4 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "CH" and essround = 4 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "NL" and essround = 4 and (hinctnta = 10)) income = 3.
if (cntry = "DK" and essround = 4 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "FI" and essround = 4 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "NO" and essround = 4 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "SE" and essround = 4 and (hinctnta = 10)) income = 3.
if (cntry = "GB" and essround = 4 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "IE" and essround = 4 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "ES" and essround = 4 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "PT" and essround = 4 and (hinctnta = 7 or hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "CZ" and essround = 4 and (hinctnta = 6 or hinctnta = 7 or hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "EE" and essround = 4 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "HU" and essround = 4 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "PL" and essround = 4 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "SI" and essround = 4 and (hinctnta = 9 or hinctnta = 10)) income = 3.


*** ESS round 5.
if (cntry = "BE" and essround = 5 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "DE" and essround = 5 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "FR" and essround = 5 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "CH" and essround = 5 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "NL" and essround = 5 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "DK" and essround = 5 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "FI" and essround = 5 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "NO" and essround = 5 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "SE" and essround = 5 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "GB" and essround = 5 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "IE" and essround = 5 and (hinctnta = 1)) income = 1.
if (cntry = "ES" and essround = 5 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "CZ" and essround = 5 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "EE" and essround = 5 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "HU" and essround = 5 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "PL" and essround = 5 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "SI" and essround = 5 and (hinctnta = 1 or hinctnta = 2)) income = 1.

if (cntry = "BE" and essround = 5 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "DE" and essround = 5 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "FR" and essround = 5 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "CH" and essround = 5 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "NL" and essround = 5 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "DK" and essround = 5 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "FI" and essround = 5 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "NO" and essround = 5 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "SE" and essround = 5 and (hinctnta = 10)) income = 3.
if (cntry = "GB" and essround = 5 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "IE" and essround = 5 and (hinctnta = 7 or hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "ES" and essround = 5 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "CZ" and essround = 5 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "EE" and essround = 5 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "HU" and essround = 5 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "PL" and essround = 5 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "SI" and essround = 5 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.


*** ESS round 6.
if (cntry = "BE" and essround = 6 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "DE" and essround = 6 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "FR" and essround = 6 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "CH" and essround = 6 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "NL" and essround = 6 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "DK" and essround = 6 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "FI" and essround = 6 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "NO" and essround = 6 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "SE" and essround = 6 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "GB" and essround = 6 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "IE" and essround = 6 and (hinctnta = 1)) income = 1.
if (cntry = "ES" and essround = 6 and (hinctnta = 1)) income = 1.
if (cntry = "PT" and essround = 6 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "CZ" and essround = 6 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3 or hinctnta = 4)) income = 1.
if (cntry = "EE" and essround = 6 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "HU" and essround = 6 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "PL" and essround = 6 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "SI" and essround = 6 and (hinctnta = 1 or hinctnta = 2)) income = 1.

if (cntry = "BE" and essround = 6 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "DE" and essround = 6 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "FR" and essround = 6 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "CH" and essround = 6 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "NL" and essround = 6 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "DK" and essround = 6 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "FI" and essround = 6 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "NO" and essround = 6 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "SE" and essround = 6 and (hinctnta = 10)) income = 3.
if (cntry = "GB" and essround = 6 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "IE" and essround = 6 and (hinctnta = 7 or hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "ES" and essround = 6 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "PT" and essround = 6 and (hinctnta = 7 or hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "CZ" and essround = 6 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "EE" and essround = 6 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "HU" and essround = 6 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "PL" and essround = 6 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "SI" and essround = 6 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.


*** ESS round 7.
if (cntry = "BE" and essround = 7 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "DE" and essround = 7 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "FR" and essround = 7 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "CH" and essround = 7 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "NL" and essround = 7 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "DK" and essround = 7 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "FI" and essround = 7 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "NO" and essround = 7 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "SE" and essround = 7 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "GB" and essround = 7 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "IE" and essround = 7 and (hinctnta = 1)) income = 1.
if (cntry = "ES" and essround = 7 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "PT" and essround = 7 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "CZ" and essround = 7 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "HU" and essround = 7 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "PL" and essround = 7 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "SI" and essround = 7 and (hinctnta = 1 or hinctnta = 2)) income = 1.

if (cntry = "BE" and essround = 7 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "DE" and essround = 7 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "FR" and essround = 7 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "CH" and essround = 7 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "NL" and essround = 7 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "DK" and essround = 7 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "FI" and essround = 7 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "NO" and essround = 7 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "SE" and essround = 7 and (hinctnta = 10)) income = 3.
if (cntry = "GB" and essround = 7 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "IE" and essround = 7 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "ES" and essround = 7 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "PT" and essround = 7 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "CZ" and essround = 7 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "HU" and essround = 7 and (hinctnta = 10)) income = 3.
if (cntry = "PL" and essround = 7 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "SI" and essround = 7 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.


*** ESS round 8.
if (cntry = "BE" and essround = 8 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "DE" and essround = 8 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "FR" and essround = 8 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "CH" and essround = 8 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "NL" and essround = 8 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "FI" and essround = 8 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "NO" and essround = 8 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "SE" and essround = 8 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "GB" and essround = 8 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "IE" and essround = 8 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "ES" and essround = 8 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "PT" and essround = 8 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "CZ" and essround = 8 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "EE" and essround = 8 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "HU" and essround = 8 and (hinctnta = 1)) income = 1.
if (cntry = "PL" and essround = 8 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "SI" and essround = 8 and (hinctnta = 1 or hinctnta = 2)) income = 1.

if (cntry = "BE" and essround = 8 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "DE" and essround = 8 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "FR" and essround = 8 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "CH" and essround = 8 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "NL" and essround = 8 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "FI" and essround = 8 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "NO" and essround = 8 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "SE" and essround = 8 and (hinctnta = 10)) income = 3.
if (cntry = "GB" and essround = 8 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "IE" and essround = 8 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "ES" and essround = 8 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "PT" and essround = 8 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "CZ" and essround = 8 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "EE" and essround = 8 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "HU" and essround = 8 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "PL" and essround = 8 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "SI" and essround = 8 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.


*** ESS round 9.
if (cntry = "BE" and essround = 9 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "DE" and essround = 9 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "FR" and essround = 9 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "CH" and essround = 9 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "NL" and essround = 9 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "DK" and essround = 9 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "FI" and essround = 9 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "NO" and essround = 9 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "SE" and essround = 9 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "GB" and essround = 9 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "IE" and essround = 9 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "ES" and essround = 9 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "PT" and essround = 9 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "CZ" and essround = 9 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "EE" and essround = 9 and (hinctnta = 1 or hinctnta = 2 or hinctnta = 3)) income = 1.
if (cntry = "HU" and essround = 9 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "PL" and essround = 9 and (hinctnta = 1 or hinctnta = 2)) income = 1.
if (cntry = "SI" and essround = 9 and (hinctnta = 1 or hinctnta = 2)) income = 1.

if (cntry = "BE" and essround = 9 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "DE" and essround = 9 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "FR" and essround = 9 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "CH" and essround = 9 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "NL" and essround = 9 and (hinctnta = 10)) income = 3.
if (cntry = "DK" and essround = 9 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "FI" and essround = 9 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "NO" and essround = 9 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "SE" and essround = 9 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "GB" and essround = 9 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "IE" and essround = 9 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "ES" and essround = 9 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "PT" and essround = 9 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "CZ" and essround = 9 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "EE" and essround = 9 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "HU" and essround = 9 and (hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "PL" and essround = 9 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.
if (cntry = "SI" and essround = 9 and (hinctnta = 8 or hinctnta = 9 or hinctnta = 10)) income = 3.


***** ESS1: Income variable is missing in FOUR countries in Round 1 (FR, IE, HU, EE).
* France: Data from France have been omitted from the international file.
if (cntry = "FR" and essround = 1) income = $SYSMIS.
* Hungary, Ireland: Deviating categories. The variable has been omitted from the international data file.
if (cntry = "IE" and essround = 1) income = $SYSMIS.
if (cntry = "HU" and essround = 1) income = $SYSMIS.
if (cntry = "EE" and essround = 1) income = $SYSMIS.

***** ESS2: Income variable is missing in TWO countries in Round 2 (EE, HU).
* Estonia and Ukraine: Data have been ommitted from the international file.
if (cntry = "EE" and essround = 2) income = $SYSMIS.
* Hungary: Hungary: Only monthly salary asked (the variable cannot be recoded according to our needs).
if (cntry = "HU" and essround = 2) income = $SYSMIS.

***** ESS3: Income variable is missing in THREE countries in Round 3 (CZ, EE, HU).
* Estonia, Hungary, Romania and Ukraine: Data have been omitted from the international file.
if (cntry = "EE" and essround = 3) income = $SYSMIS.
if (cntry = "HU" and essround = 3) income = $SYSMIS.
if (cntry = "CZ" and essround = 3) income = $SYSMIS.

***** ESS4: Income variable is NOT missing in any country in round 4.

***** ESS5: Income variable is missing in ONE country in Round 5 (PT).
* Portugal: Data have been omitted from the international file.
if (cntry = "PT" and essround = 5) income = $SYSMIS.

***** ESS6: Income variable is NOT missing in any country in round 6.

***** ESS7: Income variable is missing in ONE country in Round 7 (EE).
* Estonia: The data have been omitted from the integrated file.
if (cntry = "EE" and essround = 7) income = $SYSMIS.

***** ESS8: Income variable is missing in ONE country in Round 8 (DK).
* The reason why income is missing in Denmark is not known (i.e. it is not explained in the cummulative data codebook).
if (cntry = "DK" and essround = 8) income = $SYSMIS.

***** ESS9: Income variable is NOT missing in any country in round 9.


fre income.
formats income (f1.0).
variable labels income "Standardized categorical income across all ESS rounds".
value labels income 
1"first income quintile"
2"middle income (quintiles 2, 3 and 4)"
3"fifth income quintile".


*** Checking the relative distribution of income groups by country (rows) and essround (columns).
*** Table A3 in the APPENDIX is based on the following syntax.
CTABLES
  /VLABELS VARIABLES=regime cntry essround income DISPLAY=BOTH
  /TABLE regime [C] > cntry [C][ROWPCT.COUNT PCT40.1] BY essround [C] > income [C]
  /CATEGORIES VARIABLES=regime cntry essround income ORDER=A KEY=VALUE EMPTY=EXCLUDE
  /CRITERIA CILEVEL=95.


*** Support for income redistribution by the FIRST income quintile.
* This syntax creates a table stored in "support_first_quintile.csv" file.
* This table is used to create the Figure 3, Figure 4, Figure 5, Figure 6 and Figure 7.
CTABLES
  /VLABELS VARIABLES=regime cntry essround income sup_red DISPLAY=BOTH
  /TABLE regime [C] > cntry [C] BY essround [C] > income [C] > sup_red [S][MEAN DOT40.2]
  /CATEGORIES VARIABLES=regime [1, 2, 3, 4, 5, OTHERNM] EMPTY=EXCLUDE
  /CATEGORIES VARIABLES=cntry essround ORDER=A KEY=VALUE EMPTY=EXCLUDE
  /CATEGORIES VARIABLES=income [1] EMPTY=INCLUDE
  /CRITERIA CILEVEL=95.

* Support for income redistribution by the MIDDLE income quintiles.
* This syntax creates a table stored in "support_middle_quintiles.csv" file.
* This table is used to create the Figure 3, Figure 4, Figure 5, Figure 6 and Figure 7.
CTABLES
  /VLABELS VARIABLES=regime cntry essround income sup_red DISPLAY=BOTH
  /TABLE regime [C] > cntry [C] BY essround [C] > income [C] > sup_red [S][MEAN DOT40.2]
  /CATEGORIES VARIABLES=regime [1, 2, 3, 4, 5, OTHERNM] EMPTY=EXCLUDE
  /CATEGORIES VARIABLES=cntry essround ORDER=A KEY=VALUE EMPTY=EXCLUDE
  /CATEGORIES VARIABLES=income [2] EMPTY=INCLUDE
  /CRITERIA CILEVEL=95.

* Support for income redistribution by the LAST/FIFTH quintile.
* This syntax creates a table stored in "support_last_quintile.csv" file.
* This table is used to create the Figure 3, Figure 4, Figure 5, Figure 6 and Figure 7.
CTABLES
  /VLABELS VARIABLES=regime cntry essround income sup_red DISPLAY=BOTH
  /TABLE regime [C] > cntry [C] BY essround [C] > income [C] > sup_red [S][MEAN DOT40.2]
  /CATEGORIES VARIABLES=regime [1, 2, 3, 4, 5, OTHERNM] EMPTY=EXCLUDE
  /CATEGORIES VARIABLES=cntry essround ORDER=A KEY=VALUE EMPTY=EXCLUDE
  /CATEGORIES VARIABLES=income [3] EMPTY=INCLUDE
  /CRITERIA CILEVEL=95.


